export const unity = {
  setIconType(type = 'default') {
    let icontype = {
      // jpg: {
      //   class: '#icon-jpg'
      // },
      // gif: {
      //   class: '#icon-jpg'
      // },
      docx: {
        class: '#el-icon-alldocx'
      },
      ppt: {
        class: '#el-icon-allpptx'
      },
      xlsx: {
        class: '#el-icon-allxlsx'
      },
      jpg: {
        class: '#el-icon-alltupian7'
      },
      default: {
        class: '#el-icon-allweibiaoti-_huabanfuben'
      },
      pdf: {
        class: '#el-icon-allpdf1'
      }
    }
    if (type == ".docx") {
      icontype.type = icontype.docx
    } else if (type == ".xlsx") {
      icontype.type = icontype.xlsx

    } else if (type == ".pdf") {
      icontype.type = icontype.pdf
    } else if (type == ".pptx") {
      icontype.type = icontype.ppt
    } else {
      icontype.type = icontype.default
    }
    return icontype.type
  }
}
export default unity
